import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router";

import CSS from "@/views/CSS.vue";
import HTML from "@/views/HTML.vue";
import JavaScript from "@/views/JavaScript.vue";

//路由表
const router = createRouter({
  //利用浏览器流失history对象记录
  // history: createWebHistory(),
  //使用hash  #
  history: createWebHashHistory(),
  routes: [
    {
      name: "myhtml",
      path: "/html",
      component: HTML,
    },
    {
      name: "mycss",
      path: "/css",
      component: CSS,
    },
    {
      name: "myjs",
      path: "/js",
      component: JavaScript,
    },
  ],
});
export default router;
